package cn.edu.zafu.bigdata.x.anonymous;

public class Course {
    private final String courseName;
    private final String courseCode;
    private final String instructor;
    private final double credits;

    // 构造函数
    public Course(String courseName, String courseCode, String instructor, double credits) {
        this.courseName = courseName;
        this.courseCode = courseCode;
        this.instructor = instructor;
        this.credits = credits;
    }

    // 打印课程信息的方法
    public void print() {
        System.out.println("课程名称: " + courseName);
        System.out.println("课程代码: " + courseCode);
        System.out.println("教师: " + instructor);
        System.out.println("学分: " + credits);
    }

    // 主方法进行测试
    public static void main(String[] args) {
        Course course = new Course("java面向对象程序设计", "CS666", "吴鹏", 4.0);
        course.print();
    }
}
